package com.jdk8.demo.lambda;

/**
 * 匿名内部类和lamdb表达式
 *
 */
public class LamdbaTest {
        Runnable r1 = ()->System.out.println("r1:"+this);
        Runnable r2 = new Runnable() {
            @Override
            public void run() {
                System.out.println("r2:"+this);
            }
        };
    public static void main(String[] args) {
        LamdbaTest lamdbTest = new LamdbaTest();
        new Thread(lamdbTest.r1).start();
        new Thread(lamdbTest.r2).start();

    }
}